Skip to content

Staging/iio masklength cleanup#2885

Merged
nunojsa merged 8 commits intomainfrom
staging/iio-masklength-cleanup
Aug 8, 2025
Merged

Staging/iio masklength cleanup#2885
nunojsa merged 8 commits intomainfrom
staging/iio-masklength-cleanup

Conversation

@nunojsa
Copy link
Copy Markdown
Collaborator

@nunojsa nunojsa commented Aug 6, 2025

PR Description

The upstream kernel has removed direct access to indio_dev->masklength. This patch series updates several drivers to use the modern helper functions iio_get_masklength() and iio_for_each_active_channel() instead.

This change aligns our out-of-tree drivers with the current upstream conventions, improves code readability, and prevents warnings from the sparse checker.

This series touches most of the out-of-tree drivers that were using the old masklength API, with the exception of the Xilinx ina260 adc driver which is not maintained by us.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

nunojsa added 8 commits August 6, 2025 16:52
Upstream has removed direct access to indio_dev->masklength.
Replace direct access with the iio_get_masklength() helper function
to align with this change and to avoid warnings from the sparse
checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace direct access with the iio_get_masklength() helper function
to align with this change and to avoid warnings from the sparse
checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace direct access with the iio_get_masklength() helper function
to align with this change and to avoid warnings from the sparse
checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace direct access with the iio_get_masklength() helper function
to align with this change and to avoid warnings from the sparse
checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace the for_each_set_bit loop with the
iio_for_each_active_channel() helper function and direct access
to indio_dev->masklength with iio_get_masklength() to align with this
change and to avoid warnings from the sparse checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace the for_each_set_bit loop with the
iio_for_each_active_channel() helper function to align with this
change and to avoid warnings from the sparse checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace the for_each_set_bit loop with the
iio_for_each_active_channel() helper function and direct access
to indio_dev->masklength with iio_get_masklength() to align with this
change and to avoid warnings from the sparse checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Upstream has removed direct access to indio_dev->masklength.
Replace direct access with the iio_get_masklength() helper function
to align with this change and to avoid warnings from the sparse
checker.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Copy link
Copy Markdown
Collaborator

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warnings/errors are unrelated to the touched lines

@nunojsa nunojsa merged commit aceed1d into main Aug 8, 2025
52 of 57 checks passed
@nunojsa nunojsa deleted the staging/iio-masklength-cleanup branch August 8, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants